package com.nanjia.boot.myflow.deliveryaddressflow.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 收货/收票信息流水表单对象
 *
 * @author 周洋
 * @since 2025-07-29 16:44
 */
@Getter
@Setter
@Schema(description = "收货/收票信息流水表单对象")
public class DeliveryAddressFlowForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "不能为空")
    private Integer id;

    @NotNull(message = "不能为空")
    private Long deliveryAddressId;

    @NotNull(message = "不能为空")
    private Long orderId;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryCode;

    @Schema(description = "0:收货地址，1：收票地址")
    @NotNull(message = "0:收货地址，1：收票地址不能为空")
    private Integer deliveryType;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryName;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryPhone;

    @Size(max=30, message="长度不能超过30个字符")
    private String postalCode;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryNation;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryProvince;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryCity;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryArea;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String deliveryDetail;

    @Schema(description = "是否是默认地址，0：非，1：是")
    @NotNull(message = "是否是默认地址，0：非，1：是不能为空")
    private Integer deliveryDefault;

    @NotNull(message = "不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @NotNull(message = "不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @NotBlank(message = "不能为空")
    @Size(max=30, message="长度不能超过30个字符")
    private String subdomainCode;

    @Size(max=30, message="长度不能超过30个字符")
    private String subdomainUserCode;

    @Schema(description = "0：停止，1：正常：2：待审核，-1：已删除")
    @NotNull(message = "0：停止，1：正常：2：待审核，-1：已删除不能为空")
    private Integer deliveryStatus;

    @Schema(description = "谁创建的")
    @NotBlank(message = "谁创建的不能为空")
    @Size(max=20, message="谁创建的长度不能超过20个字符")
    private String createBy;

    @Schema(description = "更新记录")
    private String updateBy;

    @Size(max=40, message="长度不能超过40个字符")
    private String createIp;

    @Size(max=40, message="长度不能超过40个字符")
    private String updateIp;


}
